package unei;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

/**
 * Created by sun on 2015/6/27.
 */
public class ScheduledMonitor {
    public static void main(String[] args){
        ScheduledExecutorService service= Executors.newScheduledThreadPool(100);
        Runnable run=new Runnable(){

            public void run() {
                System.out.println("running...");
            }
        };

        service.scheduleWithFixedDelay(run,1,1, TimeUnit.SECONDS);
    }

}
